-
Notifications
You must be signed in to change notification settings - Fork 5.3k
[Wasm RyuJIT] Initial scaffolding for calls and helper calls #123044
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
|
Tagging subscribers to this area: @JulieLeeMSFT, @jakobbotsch |
741ddb8 to
e805a10
Compare
AndyAyersMS
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We still need to figure out in detail how to specify what method we want to call.
We know roughly what kind of Wasm we want to produce (per the calling convention doc we'll be making lots of indirect calls) but we need help from the JIT host to make this all work out.
I think it might be ok for now to just defer this part of the work and try and get everything else lined up?
| } | ||
| else | ||
| { | ||
| params.callType = EC_INDIR_R; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we want custom EmitCallTypes for Wasm?
Note for calls we are still thinking of the parameters as being passed in regs (perhaps specially encoded to distinguish them from wasm locals, which we are also thinking of as regs).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think custom EmitCallTypes is a good idea.
I'm not sure it makes sense to have imaginary regs for parameters; we should be able to emit
i32.const 5
i32.const <ftnptr>
call_indirect someFuncThatAcceptsIntor the equivalent for foo(5) without having to shove 5 into a temp reg and then load it. Or do we need to associate all values, even constants, with registers for things to work? I would have assumed you could just have an icon node in the args list for a call node and it would work.
| // Generate a direct call to a non-virtual user defined or helper method | ||
| assert(call->IsHelperCall() || (call->gtCallType == CT_USER_FUNC)); | ||
|
|
||
| if (call->gtEntryPoint.addr != NULL) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Per the calling convention, for user and helper calls we'll also be invoking them indirectly.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Right. I'm not clear on whether that means there won't be an addr filled in
b95ce18 to
499127d
Compare
|
This branch now hits this in crossgen2: |
Depends on #123021
Starting to put together all the code we need for helper calls and calls in general.